var = lambda x, y: x ** y
x = var(2, 4)
print(x)


def text(a, b, func):
    print(func(a, b))


text(1, 2, lambda x, y: x + y)

list2 = [{'a': 10, 'b': 2}, {'a': 50, 'b': 3}, {'a': 1, 'b': 1}, {'a': 89, 'b': 1}]
#
x = max(list2, key=lambda x: x['b'])
print(x)
x = sorted(list2, key=lambda x: x['a'], reverse=True)
print(x)

